

ARCH := amd64

ifeq ($(ARCH), mips)
CC := mipsel-linux-gcc
CXX := mipsel-linux-g++
else
endif

ifneq ($(KERNELRELEASE),)

obj-m := t.o
t-objs := tx.o

else

PWD := $(shell pwd)
KVER := $(shell uname -r)

ifeq ($(ARCH), mips)
KDIR := /opt/data/sctek/mozart-youtong/kernel-3.10/
else
KDIR := /lib/modules/$(KVER)/build
endif

all:
	$(MAKE) -C $(KDIR) M=$(PWD) modules V=1

clean:
	rm -rf *.ko *.o *.mod.c *.symvers *.order *.markers *~
	rm -rf .*.cmd .tmp_* .*.mk

endif
